﻿using System.Windows.Forms;

namespace SpiderStudy.ViewManage
{
    internal class GroupBoxHelper
    {/// <summary>
     /// GroupBox替换操作
     /// </summary>
     /// <param name="groupBox1"></param>
     /// <param name="Control"></param>
        internal void Replace(GroupBox groupBox1, UserControl Control)
        {
            groupBox1.Controls.Clear();
            groupBox1.Controls.Add(Control);
        }

        /// <summary>
        /// 替换模式
        /// </summary>
        /// <param name="groupBox1"></param>
        /// <param name="text"></param>
        internal void RepMode(GroupBox groupBox1, string text)
        {
            switch (text)
            {
                case "ACGFI":
                    Replace(groupBox1, new ACGFIControl());
                    break;

                case "Baidu":
                    Replace(groupBox1, new BaiduControl());
                    break;

                case "数据挖掘":
                    Replace(groupBox1, new KeysExcavateControl());
                    break;

                case "半次元":
                    Replace(groupBox1, new BcyControl());
                    break;
            }
        }
    }
}